package main

import (
	"fmt"
)

// map和 slice组合

func main()  {
	// 元素类型为map的切片
	var s1 = make([]map[int]string, 1 ,10)  //panic: runtime error: index out of range [0] with length 0
	// 再对map进行初始化
	s1[0] = make(map[int]string, 1)

	s1[0][10] = "肖禹庭"
	fmt.Println(s1)

	// 值为切片的map
	var s2 = make(map[string][]int, 10)
	s2["北京"] = []int{1,2,3,4,5}
	fmt.Println(s2)
	//
	//result :
	//[map[10:肖禹庭]]
	//map[北京:[1 2 3 4 5]]




}
